package simulator.software;

/**
 * Abtract base class for common interrupt functionality.
 * 
 * @author Kyle Loomis
 * 
 */
public abstract class Interrupt
{
   protected int step = 0;

   public Interrupt(int step)
   {
      this.step = step;
   }

   /**
    * Gets the step on which this interrupt is scheduled to occur.
    * 
    * @return the step on which this interrupt is scheduled to occur.
    */
   public int getStep()
   {
      return step;
   }

   /**
    * Schedules this interrupt to occur on the given step.
    * 
    * @param step
    *           the step on which this interrupt is scheduled to occur
    */
   public void setStep(int step)
   {
      this.step = step;
   }

   /**
    * Gets the description of the interrupt
    * 
    * @return the description of the interrupt
    */
   public abstract String getDescription();
}
